//
//  SaleViewController.m
//  BigJoy
//
//  Created by Rowling on 2017/7/19.
//  Copyright © 2017年 Rowling. All rights reserved.
//

#import "SaleViewController.h"
#import "SDCycleScrollView.h"
#import "AuthenticationDesignerVC.h"

@interface SaleViewController ()
@property (weak, nonatomic) IBOutlet UIView *cycleContentView;
@property (nonatomic,strong) SDCycleScrollView *cycleView;
@end

@implementation SaleViewController

-(SDCycleScrollView *)cycleView {
    if(_cycleView == nil) {
        _cycleView = [[SDCycleScrollView alloc]init];
        _cycleView.autoScrollTimeInterval = 4;
        _cycleView.backgroundColor     = [UIColor whiteColor];
        _cycleView.pageDotColor = [UIColor clearColor];
        _cycleView.currentPageDotColor = [UIColor whiteColor];
        _cycleView.bannerImageViewContentMode = UIViewContentModeScaleAspectFit;
    }
    return  _cycleView;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.cycleContentView addSubview: self.cycleView];
    NSMutableArray * mutableArray = [NSMutableArray arrayWithArray:self.navigationController.childViewControllers];
    [mutableArray removeObjectAtIndex:2];
    [self.navigationController setViewControllers:mutableArray animated:YES];
    self.title = @"预览";
    [self.cycleView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.top.equalTo(self.cycleContentView);
    }];
    self.cycleView.localizationImageNamesGroup = self.imgArray;
}
// 前往了解
- (IBAction)konwButton:(id)sender {
    AuthenticationDesignerVC * vc = [AuthenticationDesignerVC new];
    [self.navigationController pushViewController:vc animated:YES];
}

@end
